toNotEmptySet

@SinceKotoolsTypes(version = "4.0")
fun <E> Collection<E>.toNotEmptySet(): Result<NotEmptySet<E>>

Returns an encapsulated NotEmptySet containing all the elements of this collection, or returns an encapsulated IllegalArgumentException if this collection is empty.